package com.donleo.demo.controller;

import com.donleo.log.MyLog;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liangd
 * @since 2021-03-03 16:52
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @MyLog(desc = "查询商品")
    @GetMapping("/findAll")
    public String findAll(){
        System.out.println("查询所有");
        return "ok";
    }

    @MyLog(desc = "商品详情")
    @GetMapping("/findById/{id}")
    public String findById(@PathVariable Integer id){
        System.out.println("单个查询");
        return "ok";
    }

    @MyLog(desc = "删除商品")
    @GetMapping("/delete/{id}")
    public String delete(@PathVariable Integer id){
        System.out.println("查询所有");
        return "ok";
    }

}
